<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;

class Order extends Model
{
    //
    //指定表名
    protected $table = 'order';
    //取消时间
    public $timestamps = false;
    //定义主键
    protected $primaryKey = 'oid';

    public function good()
    {
       // return $this->hasOne('App\Model\M9_good','gid');
        return $this->belongsTo('App\Model\M9_good', 'o_gid','gid');
    }

    public function user()
    {
        return $this->belongsTo('App\Models\User', 'o_uid','uid');
    }
}
